$(document).ready(function(){ 
	$('#header').animate({'top':'0px'},400);
	$.getJSON(path+"/soccer/teamAction!selectAllTeam.action", function(data){
//	  	  debugger;
		  var teamList = data.teamList;
	  	  var teamHtml=[];
	  	  $.each(teamList,function(index,obj){//debugger;
	  		  teamHtml.push("<div class='portfolio_item' onclick='teamMain(\""+obj.rowId+"\",\""+obj.teamName+"\");'>");
	  		  teamHtml.push("<div class='portfolio_image'><img src='"+path+"/assets/webtmp1/images/portfolio_thumb.jpg' alt='' title='' border='0' /></div>");
	  		  teamHtml.push("<div class='portfolio_details'>");
	  		  teamHtml.push("<h4>"+obj.teamName+"</h4>");
	  		  teamHtml.push("<p>建队日期:&nbsp&nbsp"+moment(obj.createDate,"YYYY-MM-DD").format("YYYY-MM-DD")+"</p>");
	  		  teamHtml.push("<p>联系人:&nbsp&nbsp"+obj.contactPerson+"</p>");
	  		  teamHtml.push("</div></div>");
	  		//teamHtml.push("<tr class='info'><td>"+obj.taskDetail+"</td><td>"+obj.sendUserName+"</td><td>"+moment(obj.sendTime,"YYYY-MM-DD HH:mm:ss").format("YYYY-MM-DD HH:mm:ss")+"</td></tr>");
	  	   });
	  	  $("#teamList").html(teamHtml.join(""));  
	  		  //alert(data);
	});
});
function goBack(){
	window.location.href=path+"/main.jsp";
}
function teamMain(teamId,teamName){
	var timestamp = (new Date()).valueOf();
	window.location.href=path+"/soccer/teamMain.jsp?teamId="+teamId+"&teamName="+teamName+"&timestamp="+timestamp;
}